package com.healthy_software.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.healthy_software.enums.Status;
import com.healthy_software.enums.Type;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@Accessors(chain = true)
@TableName("goals")

public class Goal {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private int id;

    /**
     * 外键
     */
    @TableField(value = "user_id")
    private int userId;

    /**
     * 目标类型
     */
    private Type type;

    /**
     * 目标状态
     */
    private Status status;

    /**
     * 起始时间
     */
    private Date startDate;

    /**
     * 结束时间
     */
    private Date endDate;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

}
